package com.subang.function.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.subang.common.annotation.Excel;
import com.subang.common.core.domain.BaseEntity;

/**
 * PK房间用户关联对象 sb_pk_room_user
 * 
 * @author subei
 * @date 2025-09-14
 */
public class SbPkRoomUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 房间ID */
    @Excel(name = "房间ID")
    private Long roomId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    @Excel(name = "用户名称")
    private String nickName;

    /** 角色（0-普通用户 1-房主） */
    @Excel(name = "角色", readConverterExp = "0=-普通用户,1=-房主")
    private Long role;

    /** 状态（0-未准备 1-已准备 2-已退出 3-被移除） */
    @Excel(name = "状态", readConverterExp = "0=-未准备,1=-已准备,2=-已退出,3=-被移除")
    private Long status;

    /** 加入时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "加入时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date joinTime;

    /** 准备时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "准备时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date readyTime;

    /** 当前总得分（实时更新） */
    @Excel(name = "当前总得分", readConverterExp = "实=时更新")
    private Long currentScore;

    /** 最终排名 */
    @Excel(name = "最终排名")
    private Long finalRank;

    /** 总答题时间(毫秒) */
    @Excel(name = "总答题时间(毫秒)")
    private Long totalAnswerTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setRoomId(Long roomId) 
    {
        this.roomId = roomId;
    }

    public Long getRoomId() 
    {
        return roomId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setRole(Long role) 
    {
        this.role = role;
    }

    public Long getRole() 
    {
        return role;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setJoinTime(Date joinTime) 
    {
        this.joinTime = joinTime;
    }

    public Date getJoinTime() 
    {
        return joinTime;
    }

    public void setReadyTime(Date readyTime) 
    {
        this.readyTime = readyTime;
    }

    public Date getReadyTime() 
    {
        return readyTime;
    }

    public void setCurrentScore(Long currentScore) 
    {
        this.currentScore = currentScore;
    }

    public Long getCurrentScore() 
    {
        return currentScore;
    }

    public void setFinalRank(Long finalRank) 
    {
        this.finalRank = finalRank;
    }

    public Long getFinalRank() 
    {
        return finalRank;
    }

    public void setTotalAnswerTime(Long totalAnswerTime) 
    {
        this.totalAnswerTime = totalAnswerTime;
    }

    public Long getTotalAnswerTime() 
    {
        return totalAnswerTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("roomId", getRoomId())
            .append("userId", getUserId())
            .append("nickName", getNickName())
            .append("role", getRole())
            .append("status", getStatus())
            .append("joinTime", getJoinTime())
            .append("readyTime", getReadyTime())
            .append("currentScore", getCurrentScore())
            .append("finalRank", getFinalRank())
            .append("totalAnswerTime", getTotalAnswerTime())
            .toString();
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
}
